//
//  UIView+WBFrame.m
//  WeiBoOC
//
//  Created by 韩菲菲 on 16/8/9.
//  Copyright © 2016年 韩菲菲. All rights reserved.
//

#import "UIView+WBFrame.h"

@implementation UIView (WBFrame)

- (void)setX:(CGFloat)X
{
    
    //1.创建个 变量 cgrect
    CGRect frame = self.frame;
    
    frame.origin.x = X;
    
    self.frame = frame;
    
}

- (CGFloat)X
{
    return self.frame.origin.x;
    
}






- (void)setY:(CGFloat)Y
{
    //1.创建个 变量 cgrect
    CGRect frame = self.frame;
    
    frame.origin.y = Y;
    
    self.frame = frame;
    
}

- (CGFloat)Y
{
    return self.frame.origin.y;
    
}


- (void)setW:(CGFloat)W
{
    //1.创建个 变量 cgrect
    CGRect frame = self.frame;
    
    frame.size.width = W;
    
    
    self.frame = frame;
    
}

- (CGFloat)W
{
    return self.frame.size.width;
    
}

- (void)setH:(CGFloat)H
{
    //1.创建个 变量 cgrect
    CGRect frame = self.frame;
    
    frame.size.height = H;
    self.frame = frame;
    
}

- (CGFloat)H
{
    return self.frame.size.height;
    
}


@end
